/**
 * Copyright (C) 2018 - 2020 https://github.com/LeeYan9
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bifrost.service;

import com.bifrost.entity.Customer;
import com.bifrost.entity.MerchantStore;
import com.bifrost.entity.Plan;
import com.bifrost.entity.User;
import com.bifrost.model.PlanCommitModel;
import com.bifrost.model.ro.PlanModel;
import com.bifrost.model.vo.PageVO;
import org.springframework.data.domain.Page;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author Lee
 * Create Class on 2018/8/13
 * @com.bifrost.service
 * @wechat-mall
 */
public interface PlanService {

    void save(PlanModel planModel, MerchantStore merchantStore, User byId);

    Page findPage(Long storeId, String storeIds, Integer page, Integer size,String planType, Date start, Date end, String status);

    Plan findOne(Long planId);

    /**
     * 展示活动
     * @param planId
     * @return
     */
    PlanModel detail(Long planId);

    /**
     * 获取活动商品的用户列表详情
     * @param planItemId
     * @param page
     * @param size
     * @param status
     * @return
     */
    PageVO itemDetail(Long planItemId, Integer page, Integer size, String status);

    /**
     * 获取活动下的活动商品列表
     * @param planId
     * @param customer
     * @return
     */
    List planDetail(Long planId, Customer customer);

    void commitApply(PlanCommitModel commitModel, Customer customer);

    void delete(Long planId, MerchantStore merchantStore, User byId);

    void hitLottery(Long planCustomerId , User user);

    List<Map> customerDetail(Customer customer , String status );

    void saveFeedback(String feedbackData, Long planCustomerId);

    PageVO<Map> feedbacks(Long planItemId, Integer page, Integer size);

    List winners(Long planItemId);
}
